<%@ page import="org.*" %>
<%@ page import="java.util.*" %>
<%@ page import= "java.util.Properties"%>
<%@ page import= "javax.mail.Message" %>
<%@ page import ="javax.mail.MessagingException"%>
<%@ page import ="javax.mail.Session"%>
<%@ page import ="javax.mail.Transport"%>
<%@ page import ="javax.mail.internet.AddressException" %>
<%@ page import ="javax.mail.internet.InternetAddress"%>
<%@ page import ="javax.mail.internet.MimeMessage" %>
 
<%@ page language="java" 
    contentType="text/html; charset=windows-1256"
    pageEncoding="windows-1256"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
  html { height: 100% }
  body { height: 100%; margin: 0px; padding: 0px }
  #map_canvas { height: 100% }
</style>
<script type="text/javascript"
    src="http://maps.google.com/maps/api/js?sensor=true">
</script>
<script type="text/javascript">

  function initialize(lat,lng) {
    var latlng = new google.maps.LatLng(lat,lng);
    var myOptions = {
      zoom: 18,
      center:     ,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
    var marker = new google.maps.Marker({
        position: latlng,
        title:"Central Location",
        //animation: google.map.Animation.DROP,
        //draggable: true
    });
    marker.setMap(map);
    
  //@neerja   
  //var infowindow = new google.maps.InfoWindow({content: 'This is mine'});
  
  	google.maps.event.addListener(marker, 'click',toggleBounce);
//  google.maps.event.addListener(map, 'click', function(event) {
//	    addMarker(event.latLng);
//	  });


function toggleBounce(){
	if(marker.getAnimation() !=null){
		
		marker.setAnimation(null);
		
	}
	else{}
	marker.setAnimation(google.maps.Animation.BOUNCE);
	var contentString = '<a href="">'+
    'Click here to write email </a></p>';
	var infowindow = new google.maps.InfoWindow({content: contentString});
	infowindow.open(map, marker);
	google.maps.event.addListner(infowindow, 'click', addMarker);
	}
	
function addMarker() {
	  alert("Inside function handler");
	  }
	
}

  
</script>
</head>
<!-- <body onload="initialize(40.8091,-73.9593)"> -->
  <% out.write("<body onload=\"initialize(" + (String)session.getAttribute("centreLat") + "," + (String)session.getAttribute("centreLng") + ")\"");%>
  <div id="map_canvas"> </div>
</body>
</html>